import md5
import library

class m_user():
    def __init__(self, parent=None):
        pass
    
    def getdata(self, getid):    
        self.db = library.db()
        self.db.where = ['id',str(getid)]
        self.conn = self.db.makeConn()
        self.data = self.db.select(self.conn,'tpengguna')
        return self.data
    
    def getdatabypass(self, getpass):
        self.db = library.db()
        self.db.where = ['password',md5.new(getpass).hexdigest()]
        self.conn = self.db.makeConn()
        self.data = self.db.select(self.conn,'tpengguna')
        return self.data
